/*    */ package com.structure.share;
/*    */ 
/*    */ import java.util.HashMap;
/*    */ 
/*    */ public class ShapeFactory
/*    */ {
/*  7 */   private static final HashMap<String, Shape> circleMap = new HashMap<String, Shape>();
/*    */ 
/*    */   public static Shape getCircle(String color) {
/* 10 */     Circle circle = (Circle)circleMap.get(color);
/*    */ 
/* 12 */     if (circle == null) {
/* 13 */       circle = new Circle(color);
/* 14 */       circleMap.put(color, circle);
/* 15 */       System.out.println("Creating circle of color : " + color);
/*    */     }
/* 17 */     return circle;
/*    */   }
/*    */ }